package cn.yunyichina.provider.pay.component;

import org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator;
import org.hibernate.validator.resourceloading.PlatformResourceBundleLocator;

import java.util.Locale;

/**
 * Created by Lullaby on 2017/9/29
 */
public class DefaultMessageInterpolator extends ResourceBundleMessageInterpolator {

    private static final String BUNDLE_NAME = "applicationMessages";

    DefaultMessageInterpolator() {
        super(new PlatformResourceBundleLocator(BUNDLE_NAME));
    }

    @Override
    public String interpolate(String template, Context context) {
        return super.interpolate(template, context, Locale.ENGLISH);
    }

}
